home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / DEV / I-Z / ViewIt™ Shareware.sea / ViewIt™ 2.04 Shareware / FaceWare.rsrc / TEXT_1279_U6. Alerts.txt < prev    next >
Text File  |  1992-08-15  |  3KB  |  31 lines

  1. U6. Alerts
  2.   UtilIt provides support for opening standard Mac alerts and a simpler, string-based form of alert.  Many FaceWare programmers, however, simply use modal ViewIt windows as alerts, thereby avoiding the use of ALRT/DITL resources required by standard alerts.
  3.  
  4. ShoAlt  153  a,b,c,d,uString,uResult
  5. StpAlt  154  a,b,c,d,uString,uResult
  6. NotAlt  155  a,b,c,d,uString,uResult
  7. CtnAlt  156  a,b,c,d,uString,uResult
  8.   Opens an alert using the Alert, StopAlert, NoteAlert, or CautionAlert toolbox calls.  The parameters a, b, c, and d have the same meaning as those used with MovAlt (see the "Windows" topic).  If uString is not empty, then the first parameter text string is set equal to it (the ^0 item, if any, in the DITL list).  The number of the enabled item pressed by the user to close the alert is returned in uResult.  If the ALRT resource is not be found, uResult returns zero.
  9.   If you prefer using SetPrm (see "Strings" topic) or the toolbox call ParamText to set parameter text strings in an alert, be careful to reset uString to an empty string just before calling ShoAlt...CtnAlt, otherwise the contents of uString will be put in the first parameter string.
  10.  
  11. ShoStr  261  a,b,c,d,uString
  12. StpStr  262  a,b,c,d,uString
  13. NotStr  263  a,b,c,d,uString
  14. CtnStr  264  a,b,c,d,uString
  15.   Creates a temporary window on the main screen in which the message in uString is displayed.  StpStr, NotStr, and CtnStr also display, respectively, the standard Stop, Note, and Caution icons.  Carriage returns and spaces can be used within uString to adjust the appearance of the string.  The next mouse or key press will cause the window to be hidden and disposed of.  If uString is empty, then UtilIt just beeps once without displaying a window.
  16.   The appearance of the string in the window is governed by parameters a, b, c, and d:
  17.   a = font number
  18.   b = size (12 pt. if b = 0)
  19.   c = style (low word) and color (hi word)
  20.     style = sum of following constants:  0 = Plain,
  21.       1 = Bold, 2 = Italic, 4 = Underline, 8 = Outline,
  22.       16 = Shadow, 32 = Condensed, 64 = Extended
  23.     color = one of following constants:
  24.       0 or 33 = black, 30 = white, 205 = red, 341 = green,
  25.       409 = blue, 273 = cyan, 137 = magenta, 69 = yellow
  26.   d = screen position
  27.    -2 = centered above front modal or active modeless
  28.     0 = centered horizontally on main screen
  29.     1 to 32767 = centered over item d in topmost window
  30.     other = global position (hi word = v, lo word = h)
  31. where c should be calculated as:  c = style + color*65536.